package com.sc.nft.feign;


import com.sc.nft.dto.IdRequest;
import com.sc.nft.req.popup.PopUpReq;
import com.sc.nft.req.popup.PopUpWebGetReq;
import com.sc.nft.sup.Result;
import com.sc.nft.vo.popup.PopUpDetailsVO;
import com.sc.nft.vo.popup.PopUpWebGetVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author JYT
 * @create 2024/4/27 11:29
 */
@FeignClient(name = "meta-mall-mini-app", path = "/wxMiniMall/popUp")
public interface WxMiniPopUpClient {

    /**
     * 保存小程序弹窗
     * @param request
     * @return
     */
    @PostMapping(value = "/create", produces = MediaType.APPLICATION_JSON_VALUE)
    Result savePopUp(PopUpReq request);

    /**
     * 小程序弹窗详情
     * @return
     */
    @PostMapping(value = "/details", produces = MediaType.APPLICATION_JSON_VALUE)
    Result<PopUpDetailsVO> detailsPopUp();

    /**
     * 启用小程序弹窗
     * @param request
     * @return
     */
    @PostMapping(value = "/enable", produces = MediaType.APPLICATION_JSON_VALUE)
    Result enable(@RequestBody IdRequest request);

    /**
     * 关闭小程序弹窗
     * @param request
     * @return
     */
    @PostMapping(value = "/disable", produces = MediaType.APPLICATION_JSON_VALUE)
    Result disable(@RequestBody IdRequest request);



    /**
     * 前台获取小程序弹窗
     * @param request
     * @return
     */
    @PostMapping(value = "/webGet", produces = MediaType.APPLICATION_JSON_VALUE)
    Result<List<PopUpWebGetVO>> webGet(PopUpWebGetReq request);


}
